package h1.sismetro.negocio.almoxarifado;

import h1.sismetro.classesbasicas.Peca;
import h1.sismetro.exceptions.AcessoAoBancoException;
import h1.sismetro.exceptions.ConexaoComBancoException;
import h1.sismetro.exceptions.NenhumaPecaCadastradaException;
import h1.sismetro.exceptions.PecaJaCadastradaException;
import h1.sismetro.exceptions.PecaNaoEncontradaException;

import java.util.List;
/**
 * 
 * @author Paulo
 * @version 1.0
 *
 */
public interface ICadastroPeca {
	public void cadastrar(Peca novaPeca) throws PecaJaCadastradaException, ConexaoComBancoException, AcessoAoBancoException;
	public boolean existe(int codigo) throws ConexaoComBancoException, AcessoAoBancoException;
	public void alterar(Peca novaPeca) throws ConexaoComBancoException, AcessoAoBancoException, PecaNaoEncontradaException;
	public void excluir(int codigo) throws ConexaoComBancoException, AcessoAoBancoException, PecaNaoEncontradaException;
	public Peca recuperar(int codigo) throws ConexaoComBancoException, AcessoAoBancoException, PecaNaoEncontradaException;
	public List<Peca> imprimir() throws ConexaoComBancoException, AcessoAoBancoException, NenhumaPecaCadastradaException;
	public int obterCodigo() throws ConexaoComBancoException, AcessoAoBancoException;
}
